import { createApp } from 'vue'
import router from '@/router/index';
import Apps from '@/App.vue'
import noSign from '@/noSign.vue';
import '@/assets/style/reset.less'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css';
// import * as ElementPlusIconsVue from '@element-plus/icons-vue'

let app : any
// import 'element-plus/lib/theme-chalk/index.css'
function isSignIn() {
    console.log(localStorage.getItem(import.meta.env.VITE_APP_USERMSG));
    if (localStorage.getItem(import.meta.env.VITE_APP_USERMSG) && localStorage.getItem(import.meta.env.VITE_APP_TOKEN)) {
         app = createApp(Apps)
        app.use(ElementPlus).use(router).mount('#app')
    } else {
        const app = createApp(noSign)
        app.use(ElementPlus).use(router as any).mount('#app')
    }
    // for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    //     app.component(key, component)
    // }
}
isSignIn()

